package com.langshixiaobai.domain.service.trial.thread;

import com.langshixiaobai.domain.adapter.repository.IActivityRepository;
import com.langshixiaobai.domain.model.valobj.SkuVO;

import java.util.concurrent.Callable;

public class QuerySkuVOFromDBThreadTask implements Callable<SkuVO> {

    /** 商品ID */
    private String goodsId;

    // 活动仓储
    private IActivityRepository repository;

    public QuerySkuVOFromDBThreadTask(String goodsId, IActivityRepository repository){
        this.goodsId = goodsId;
        this.repository = repository;
    }

    //商品信息
    @Override
    public SkuVO call() throws Exception {
        //数据库查询
       return repository.querySkuByGoodsId(goodsId);
    }
}
